<?php 

// echo $this->js->ajax("ok","/mvc/blog/create");
$this->layout = '~/views/shared/_defaultLayout.php';
?>
<div class="block bgWhite">
	<div class="content"><div id='bloglist'></div></div>
</div>

<div class="block bgWhite">
	<div class="content">
		<img src="http://catalizt.com/wp-content/uploads/2013/07/blog-banner.jpg" width="990" alt="" />
	</div>
	<div class="content">
	
		<!-- Stack the columns on mobile by making one full-width and the other half-width -->
<div class="row header_row">
  <div class="col-xs-6 col-md-4 interest"><h2>Interest</h2></div>
  <div class="col-xs-6 col-md-4">
    <div class="radio radio_row">
          <label><input type="radio" name="optradio">Learn</label>
        </div>
        <div class="col-xs-6 col-md-4">
        <div class="radio radio_row">
          <label><input type="radio" name="optradio">Teach</label>
        </div>
        </div>
    
</div>
</div><?php echo $chk; ?>		
			<div class="row">
      
			<script type="text/javascript">
   //               function validateForm() {
   //               var x = document.forms["myForm"].value;
   //               if (x==null || x=="") {
   //                   $("p").show();
   //                   return false;
   //               }
   //          }
   //          </script>
 				<form action="" method="post" name="myForm" onsubmit="return validateForm()">
                <p class="ptag">All Feilds are requried</p>
 				<div class="col-xs-6 col-sm-4">General Learning</div>
				<?php foreach($getSubCats as $item){ 
				if (in_array($item['id'],unserialize($getInterest['meta_value']))) {
						$sel = "checked='checked'";
					}	else{
						$sel = "";
					}

				?>
			
  			<div class="col-xs-6 col-sm-4">
  				<div class="checkbox">
			      <label>
			        <input type="checkbox" <?php echo $sel; ?> name="cat_name[]" value="<?php echo $item['id']; ?>"><?php echo $item['cat_name']; ?>
			        

				</label>
    			</div>
  			</div>
  			<?php } ?>
  			<input type="hidden" name="user_id" value="1">
			        <input type="hidden" name="meta_key" value="<?php echo $default; ?>">
			        <input type="hidden" name="id" value="<?php echo (isset($getInterest)) ? $getInterest['id']:null ?>">
                        <div class="col-xs-12 col-md-6">
                            <input type="submit" name="usersubmit" class="btn btn-primary" value="Save"  />
                        </div>
                    </form>
		</div>

</div>